<div class="breadcrumb"><?php the_breadcrumb(); ?></div>
<?php do_vertical_space('10'); ?>
<h1 class="font-azul">Últimas Notícias</h1>
<?php //( in_category('Artigos') ) == 0)
do_vertical_space('15');
global $aux; 
$aux = 1;
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query('posts_per_page=2'.'&paged='.$paged);
while ($wp_query->have_posts()) : $wp_query->the_post(); 
	?>
		<div class="conteiner-noticia" style="<?php if (($aux%2)==1) echo 'float: left;'; else echo 'float: right;';  ?>">
		<?php
		if ( has_post_thumbnail() && ($aux%2) == 1 ) { ?>
			<div style="width: 308px;">
				<div style="float: left;"><?php the_post_thumbnail(); ?></div>
				<h2><a style="color: #008ad2;" href="<?php echo get_post_meta($post->ID, 'url', true); ?>" target="_blank"><?php the_title();?></a></h2>
				<?php do_vertical_space('3'); ?>
				<p class="data"><?php the_time(get_option('date_format')); ?></p>
			</div>
			<?php do_vertical_space('3'); ?>
			<div class="resumo">
				<a style="color:#020202;" href="<?php echo get_post_meta($post->ID, 'url', true); ?>"><?php the_excerpt(); ?></a>
			</div>
			<?php do_vertical_space('3'); ?>
			<div><p class="fonte">Fonte: <?php echo get_post_meta($post->ID, 'fonte', true); ?></p></div>
		<?php 
		} elseif ( ($aux%2) == 1 ) { ?>
			<div style="width: 308px;">	
				<h2 style="margin: 0;"><a style="color: #008ad2;" href="<?php echo get_post_meta($post->ID, 'url', true); ?>" target="_blank"><?php the_title();?></a></h2>
				<?php do_vertical_space('3'); ?>
				<p class="data" style="margin: 0;"><?php the_time(get_option('date_format')); ?></p>
			</div>
			<?php do_vertical_space('3'); ?>
			<div class="resumo">
				<a style="color:#020202;" href="<?php echo get_post_meta($post->ID, 'url', true); ?>"><?php the_excerpt(); ?></a>
			</div>
			<?php do_vertical_space('3'); ?>
			<div><p class="fonte">Fonte: <?php echo get_post_meta($post->ID, 'fonte', true); ?></p></div>						
		<?php 
		}
		if ( has_post_thumbnail() && ($aux%2) == 0 ) { ?>					
			<div style="width: 308px;">
				<div style="float: left;"><?php the_post_thumbnail(); ?></div>
				<h2><a style="color: #008ad2;" href="<?php echo get_post_meta($post->ID, 'url', true); ?>" target="_blank"><?php the_title();?></a></h2>
				<?php do_vertical_space('3'); ?>
				<p class="data"><?php the_time(get_option('date_format')); ?></p>
			</div>
			<?php do_vertical_space('3'); ?>
			<div class="resumo">
				<a style="color:#020202;" href="<?php echo get_post_meta($post->ID, 'url', true); ?>"><?php the_excerpt(); ?></a>
			</div>
			<?php do_vertical_space('3'); ?>
			<div><p class="fonte">Fonte: <?php echo get_post_meta($post->ID, 'fonte', true); ?></p></div>
		<?php 
		} elseif ( ($aux%2) == 0 ) { ?>
			<div style="width: 308px;">	
				<h2 style="margin: 0;"><a style="color: #008ad2;" href="<?php echo get_post_meta($post->ID, 'url', true); ?>" target="_blank"><?php the_title();?></a></h2>
				<?php do_vertical_space('3'); ?>
				<p class="data" style="margin: 0;"><?php the_time(get_option('date_format')); ?></p>
			</div>
			<?php do_vertical_space('3'); ?>
			<div class="resumo">
				<a style="color:#020202;" href="<?php echo get_post_meta($post->ID, 'url', true); ?>"><?php the_excerpt(); ?></a>
			</div>
			<?php do_vertical_space('3'); ?>
			<div><p class="fonte">Fonte: <?php echo get_post_meta($post->ID, 'fonte', true); ?></p></div>						
		<?php 
		}
		?>
	</div>
	
	<?php if ( ($aux%2) == 0 ) { ?>
		<hr size="1" color= "#eaeaea" style="width: 300px; margin: auto; float: left;" />
		<hr size="1" color= "#eaeaea" style="width: 300px; margin: 0 10px 0 0; float: right;" />
		<?php do_vertical_space('230'); ?>
	<?php 
	}	
	$aux = $aux + 1;
		

	
	 

endwhile; ?>
<div class="clr"></div>
<?php 
//Faz a paginação do conteúdo
$url = get_bloginfo( 'url' );
$url = $url.'/noticias/';
pagination( $wp_query, $url );
?>

